home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / 607+gest.cpt / Gestalt.h next >
Text File  |  1990-10-17  |  9KB  |  285 lines

  1. /*
  2.  *  Gestalt.h for system 6.0.6 
  3.  *
  4.  *  Copyright (c) 1990 Symantec Corporation.  All rights reserved.
  5.  *
  6.  *  These interfaces are based on material copyrighted
  7.  *  by Apple Computer, Inc., 1985-1990.
  8.  *
  9.  *    Written 10/9/90 MYG  based on the  MPW Gestaltequ.h of 6-14-90
  10.  *
  11.  *    Revised 10/16/90 MYG Fixed some TYPEO's
  12.  */
  13.  
  14.  
  15. #ifndef _Gestalt_
  16. #define _Gestalt_
  17.  
  18.  
  19. #ifndef    _MacTypes_
  20. #include <MacTypes.h>
  21. #endif /* _MacTypes_ */
  22.  
  23. pascal OSErr Gestalt( OSType selector, long *response );
  24. pascal OSErr NewGestalt( OSType selector, ProcPtr gestaltFunction );
  25. pascal OSErr ReplaceGestalt( OSType selector, ProcPtr gestaltFunction,
  26.     ProcPtr *oldGestaltFunction);
  27.  
  28.  
  29.  
  30. /************************
  31.  *    Gestalt error codes
  32.  ************************/
  33. enum {
  34.     gestaltLocationErr = -5553,    /* gestalt function ptr wasn't in sysheap */
  35.     gestaltDupSelectorErr,        /* tried to add an entry that already existed */
  36.     gestaltUndefSelectorErr,    /* undefined selector was passed to Gestalt */
  37.     gestaltUnknownErr            /* value returned if Gestalt doesn't know the answer */
  38. };
  39.  
  40.     
  41. /**************************
  42.  *    Environment Selectors
  43.  **************************/
  44. #define gestaltVersion                'vers'            /* gestalt version */
  45.  
  46. #define gestaltAddressingModeAttr    'addr'            /* addressing mode attributes */
  47. enum {
  48.     gestalt32BitAddressing,
  49.     gestalt32BitSysZone,
  50.     gestalt32BitCapable
  51. };
  52.  
  53. #define gestaltAliasMgrAttr         'alis'            /* Alias Mgr Attributes */
  54. #define gestaltAliasMgrPresent        0                /* True if the Alias Mgr is present */
  55.  
  56. #define gestaltAppleTalkVersion     'atlk'            /* appletalk version */
  57.  
  58. #define gestaltAUXVersion            'a/ux'            /* a/ux version, if present */
  59.  
  60. #define gestaltConnMgrAttr            'conn'            /* connection mgr attributes    */
  61. enum {
  62.     gestaltConnMgrPresent,
  63.     gestaltConnMgrErrorString,
  64.     gestaltConnMgrCMSearchFix = 3 
  65. };
  66.  
  67. #define gestaltCRMAttr                'crm '            /* comm resource mgr attributes */
  68. #define gestaltCRMPresent            0
  69.  
  70. #define gestaltCTBManagers            'ctbm'            /* bitmask of which managers are present    */
  71.  
  72. #define gestaltCTBUtilsAttr            'ctbu'            /* CommToolbox utilities attributes    */
  73. #define gestaltCTBUtilsPresent        0
  74.  
  75. #define    gestaltCTBVersion            'ctbv'            /* CommToolbox version */
  76.  
  77. #define gestaltDBAccessMgrAttr        'dbac'            /* Database Access Mgr attributes */
  78. #define gestaltDBAccessMgrPresent    0                /* True if Database Access Mgr present */
  79.  
  80. #define gestaltEditionMgrAttr        'edtn'            /* Edition Mgr attributes */
  81. #define gestaltEditionMgrPresent    0                /* True if Edition Mgr present */
  82.  
  83. #define gestaltAppleEventsAttr        'evnt'            /* Apple Events attributes */
  84. #define gestaltAppleEventsPresent    0                /* True if Apple Events present */
  85.  
  86. #define gestaltFolderMgrAttr        'fold'            /* Folder Mgr attributes */
  87. #define gestaltFolderMgrPresent     0                /* True if Folder Mgr present */
  88.  
  89. #define gestaltFontMgrAttr            'font'            /* Font Mgr attributes */
  90. #define gestaltOutlineFonts         0                /* True if Outline Fonts supported */
  91.  
  92. #define gestaltFPUType                'fpu '            /* fpu type */
  93. enum {
  94.     gestaltNoFPU,
  95.     gestalt68881,
  96.     gestalt68882,
  97.     gestalt68040FPU
  98. };
  99.      
  100. #define gestaltFXfrMgrAttr            'fxfr'            /* file transfer manager attributes */
  101. #define gestaltFXfrMgrPresent        0
  102. #define gestaltFXfrMgrErrorString    1
  103.  
  104. #define gestaltHardwareAttr         'hdwr'            /* hardware attributes */
  105. enum {
  106.     gestaltHasVIA1,
  107.     gestaltHasVIA2,
  108.     gestaltHasASC = 3,
  109.     gestaltHasSCC,
  110.     gestaltHasSCSI = 7
  111. };
  112.  
  113.     
  114. #define gestaltHelpMgrAttr            'help'            /* Help Mgr Attributes */
  115. #define gestaltHelpMgrPresent        0                /* true if help mgr is present */
  116.  
  117. enum {
  118.     gestaltKeyboardType = 1,
  119.     gestaltMacKbd,
  120.     gestaltMacAndPad,
  121.     gestaltMacPlusKbd,
  122.     gestaltExtADBKbd,
  123.     gestaltStdADBKbd,
  124.     gestaltPrtblADBKbd,
  125.     gestaltPrtblISOKbd,
  126.     gestaltStdISOADBKbd,
  127.     gestaltElmerKbd,
  128.     gestaltElmerISOKbd
  129. };
  130.     
  131.     
  132. #define gestaltKeyboardType         'kbd '            /* keyboard type */
  133.  
  134. #define gestaltLowMemorySize        'lmem'            /* size of low memory area */
  135.  
  136. #define gestaltLogicalRAMSize        'lram'            /* logical ram size */
  137.  
  138. #define    gestaltMiscAttr                'misc'            /* miscellaneous attributes */
  139. #define    gestaltScrollingThrottle    0                /* true if scrolling throttle on */
  140.  
  141. #define gestaltMMUType                'mmu '            /* mmu type */
  142. enum {
  143.     gestaltNoMMU,
  144.     gestaltAMU,
  145.     gestalt68851,
  146.     gestalt68030MMU,
  147.     gestalt68040MMU
  148. };
  149.  
  150. #define gestaltStdNBPAttr            'nlup'            /* standard nbp attributes */
  151.  
  152. #define gestaltStdNBPPresent        0
  153.  
  154. #define    gestaltNotificationMgrAttr    'nmgr'           /* notification manager attributes */
  155. #define    gestaltNotificationPresent    0                /* notification manager exists */
  156.  
  157. #define gestaltOSAttr                'os  '            /* o/s attributes */
  158.  
  159. enum {
  160.     gestaltSysZoneGrowable,
  161.     gestaltLaunchCanReturn,
  162.     gestaltLaunchFullFileSpec,
  163.     gestaltLaunchControl,
  164.     gestaltTempMemSupport,
  165.     gestaltRealTempMemory,
  166.     gestaltTempMemTracked,
  167.     gestaltIPCSupport,
  168.     gestaltSysDebuggerSupport
  169. };
  170.     
  171. #define gestaltLogicalPageSize        'pgsz'            /* logical page size */
  172.  
  173. #define gestaltPowerMgrAttr         'powr'            /* power manager attributes */
  174. enum {
  175.     gestaltPMgrExists,
  176.     gestaltPMgrCPUIdle,
  177.     gestaltPMgrSCC,
  178.     gestaltPMgrSound
  179. };
  180.  
  181. #define    gestaltPPCToolboxAttr        'ppc '            /* PPC toolbox attributes */
  182.  
  183. /*
  184.  * PPC will return the combination of following bit fields.
  185.  * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncomming + gestaltPPCSupportsOutGoing
  186.  * indicates PPC is cuurently is only supports real time delivery
  187.  * and both icoming and outgoing network sessions are allowed.
  188.  * By default local real time delivery is supported as long as PPCInit has been called.
  189.  */
  190.  
  191. enum {
  192.     gestaltPPCToolboxPresent,
  193.     gestaltPPCSupportsIncomming,
  194.     gestaltPPCSupportsOutGoing,
  195.     gestaltPPCSupportsRealTime = 0X1000,
  196.     gestaltPPCSupportsStoreAndForward = 0X2000,
  197.     gestaltPPCSupportsDontCare = 0x4000
  198. };
  199.     
  200. #define gestaltProcessorType        'proc'            /* processor type */
  201. enum {
  202.     gestalt68000 = 1,
  203.     gestalt68010,
  204.     gestalt68020,
  205.     gestalt68030,
  206.     gestalt68040
  207. };
  208.  
  209. #define gestaltParityAttr            'prty'            /* parity attributes */
  210. #define gestaltHasParityCapability    0                /* has ability to check parity */
  211. #define gestaltParityEnabled        1                /* parity checking enabled */
  212.  
  213. #define gestaltQuickdrawVersion     'qd  '            /* quickdraw version */
  214. #define gestaltOriginalQD            0x000            /* original 1-bit QD            <3.2> */
  215. #define gestalt8BitQD                0x100            /* 8-bit color QD                <3.2> */
  216. #define gestalt32BitQD                0x200            /* 32-bit color QD                <3.2> */
  217.  
  218. #define gestaltPhysicalRAMSize        'ram '            /* physical RAM size */
  219.  
  220. #define gestaltPopupAttr            'pop!'            /* popup cdef attributes */
  221. #define gestaltPopupPresent            0
  222.  
  223. #define gestaltResourceMgrAttr        'rsrc'            /* Resource Mgr attributes */
  224. #define gestaltPartialRsrcs         0                /* True if partial resources exist */
  225.  
  226. #define gestaltScriptMgrVersion     'scri'            /* Script Manager version number    <08/05/89 pke> */
  227. #define gestaltScriptCount            'scr#'            /* number of active script systems    <08/05/89 pke> */
  228.  
  229. #define gestaltSoundAttr            'snd '            /* sound attributes */
  230. enum {
  231.     gestaltStereoCapability,
  232.     gestaltStereoMixing,
  233.     gestaltSoundIOMgrPresent = 3,
  234.     gestaltSoundInputPresent
  235. };
  236.     
  237. #define    gestaltStandardFileAttr        'stdf'            /* Standard File attributes */
  238. #define    gestaltStandardFile58        0                 /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
  239.  
  240. #define gestaltTextEditVersion        'te  '            /* TextEdit version number            <08/05/89 pke> */
  241. enum {
  242.     gestaltTE1 = 1,        /* TextEdit in MacIIci ROM <8Aug89smb> */
  243.     gestaltTE2,    /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) <8Aug89smb> */
  244.     gestaltTE3,    /* TextEdit with 6.0.4 Script Systems all but MacIIci <8Aug89smb> */
  245.     gestaltTE4    /* TextEdit in Big Bang <8Aug89smb> */
  246. };
  247.  
  248. #define gestaltTermMgrAttr            'term'            /* terminal mgr attributes    */
  249. #define gestaltTermMgrPresent        0                
  250. #define gestaltTermMgrErrorString    1
  251.  
  252. #define gestaltTimeMgrVersion        'tmgr'            /* time mgr version */
  253. #define gestaltStandardTimeMgr        1                /* standard time mgr is present */
  254. #define gestaltRevisedTimeMgr        2                /* revised time mgr is present */
  255. #define gestaltExtendedTimeMgr        3                /* extended time mgr is present */
  256.  
  257. #define gestaltVMAttr                'vm  '            /* virtual memory attributes */
  258. #define gestaltVMPresent            0                /* true if virtual memory is present */
  259.  
  260. /*************************
  261.  *    Info-only selectors
  262.  ************************/
  263. #define gestaltMachineType            'mach'            /* machine type */
  264. enum {
  265.     gestaltClassic = 1,
  266.     gestaltMacXL,
  267.     gestaltMac512KE,
  268.     gestaltMacPlus,
  269.     gestaltMacSE,
  270.     gestaltMacII,
  271.     gestaltMacIIx,
  272.     gestaltMacIIcx,
  273.     gestaltMacSE030,
  274.     gestaltPortable,
  275.     gestaltMacIIci,
  276.     gestaltMacIIfx = 13
  277. };
  278.     
  279. #define gestaltMachineIcon            'micn'            /* machine icon */
  280.  
  281. #define gestaltROMSize                'rom '            /* rom size */
  282. #define gestaltROMVersion            'romv'            /* rom version */
  283. #define gestaltSystemVersion        'sysv'            /* system version*/
  284.  
  285. #endif